<template>
	<view class="empty-box" :style="{marginTop:top+'rpx',background:showBg?'#fff':'transparent'}">
		<view class="img_box">
			<image :src="imgSrc+'none.png'" mode="widthFix"></image>
		</view>
		
		<view class="txt">{{text || `暂无数据`}}</view>
	</view>
</template>

<script>
	export default{
		props: {
			text: {
				type: String,
				default: '',
			},
			top:{
				type: Number,
				default: 200,
			},
			showBg:{
				type: Boolean,
				default: false,
			}
		},
		data(){
			return{
			}
		}
	}
	
</script>

<style lang="scss" scoped>
	.empty-box{
		position: relative;
		z-index: 999;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		background: #fff;
		padding: 30rpx;
		.img_box{
			width: 340rpx;
			image{
				width: 100%;
			}
		}
		
		.txt{
			margin: 30rpx 0 30rpx;
			font-size: 35rpx;
			color: #6E6E6E;
		}
	}
</style>
